package com.hdit.guimei.util;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 冰镇小可乐
 * @ClassNamePageUtil
 * @Description TODO
 * @Date 2021/1/19 14:26
 * Version 1.0
 */
public class PageUtil {
    public static Map Page(int i, int pageNum, int pageSize){
        Map<String,Object> map=new HashMap();
        if (i>0){
            if (pageNum<1){
                pageNum=1;
            }
            int from =(pageNum-1) * pageSize;
            map.put("from",from);
            map.put("pageSize",pageSize);
        }
        return map;
    }
}
